package fileMAX.file00;

import java.io.File;

public class DeleteDirDemo {
    public static void main(String[] args) {
        File file = new File("demo");
//        File file = new File("a");
        if(file.exists()){
            file.delete();//delete方法删除目录时只能删除空目录
            System.out.println("文件删除成功");
        }else {
            System.out.println("文件不存在");
        }
    }
}
